package com.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.blog.entity.SysCategory;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author gxcc
 * @create 2021/10/7 20:20
 */
@Service
public interface CategoryService extends IService<SysCategory> {


    /**
     * 查询出所有数据，包括active
     * @param
     * @return
     */
    List<SysCategory> queryAll();

    /**
     * 更新分类的id
     * @param enabled 分类的状态
     * @param categoryId 分类的id
     * @return
     */
    void updateActive(Integer enabled,String categoryId);

    /**
     * 后台条件查询分类
     * @param createBy
     * @param categoryName
     * @return
     */
    List<Map<String, Object>> queryCategoryByCondition(String createBy, String categoryName);
}
